<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="renderer" content="webkit" />
    <meta name="format-detection" content="telephone=no" />
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
    <title>我的<?php echo $output['site_name']?></title>
    <link rel="stylesheet" href="<?php echo TEMPLATE_SITE_URL;?>/zsm-static/assets/p/women/women.css">
    <link href="<?php echo TEMPLATE_SITE_URL;?>/css/common.css" type="text/css" rel="stylesheet">
    <link href="<?php echo TEMPLATE_SITE_URL;?>/css/user.css" type="text/css" rel="stylesheet">
    <script src="<?php echo TEMPLATE_SITE_URL;?>/zsm-static/_build/c/index.js"></script>
    <script src="<?php echo TEMPLATE_SITE_URL;?>/zsm-static/_build/c/jquery.min.js"></script>
    <!-- layer插件手机版 -->
    <script src="<?php echo TEMPLATE_SITE_URL;?>/zsm-static/_build/c/layer/layer.js"></script>
    <link rel="stylesheet" href="<?php echo TEMPLATE_SITE_URL;?>/zsm-static/_build/c/layer/need/layer.css">
</head>
<body>
<div class="app">
    <section class="info">
        <div class="gengduo showtip">个人</br>中心</div>
        <div class="myMenuMain">
            <div class="menuMask"></div>
            <div class="menuBox">
                <div class="menuItem userinfo">
                    <div class="avatar" style="background-image: url(<?php if(!empty($output['user']['avatar'])){ echo $output['user']['avatar'];}else{ echo 'member.png';}?>)"></div>
                    <div class="name"><?php echo $output['user']['nickname']?>
                        <div class="syncUserinfo"></div>
                    </div>
                    <div class="signature"></div>
                </div>
                <a href="index.php?act=my&op=message">
                    <div class="menuItem msg">
                        <div class="title">我的消息</div>
                        <div class="desc"><span>不错过</span>每个消息</div>
                    </div>
                </a>
                <a href="index.php?act=my&op=myinfo&user_id=<?php echo $output['user']['user_id'];?>">
                    <div class="menuItem balance">
                        <div class="title">我的余额</div>
                        <div class="desc">余额<span> <?php echo $output['user']['price'];?>元</span></div>
                    </div>
                </a>
                <a href="index.php?act=my&op=userorder&userid=<?php echo $output['user']['user_id'];?>">
                    <div class="menuItem order">
                        <div class="title">我的订单</div>
                        <div class="desc">买买买，<span>卖卖卖</span></div>
                    </div>
                </a>
                <a href="index.php?act=index&op=qunfa">
                    <div class="menuItem saleMsg">
                        <div class="title">群发消息</div>
                        <div class="desc"><span>群发</span>拍品消息</div>
                    </div>
                </a>
                <a href="index.php?act=index&op=yao&cate_id=1&t=<?php echo time();?>">
                    <div class="menuItem shake">
                        <div class="title">摇一摇</div>
                        <div class="desc"><span>搜罗</span>兴趣拍品</div>
                    </div>
                </a>
                <a href="index.php?act=renzheng&op=renzheng">
                    <div class="menuItem manage">
                        <div class="title">资质认证</div>
                    </div>
                </a>	  <a href="index.php?act=renzheng&op=zhuanchang&curpage=1">      <div class="menuItem manage">        <div class="title">我的专场</div>      </div>      </a>

                <div class="menuBottom">
                    <div class="menuItem help" onclick="location.href='<?php echo $output['help_link']['value'];?>';">
                        <div class="title">帮助中心</div>
                    </div>
                    <div class="menuItem about" onclick="location.href='<?php echo $output['about_link']['value'];?>';">
                        <div class="title">关于<?php echo $output['site_name'];?></div>
                    </div>
                </div>
            </div>

        </div>
        <div class="touxiang">
            <img src="<?php if(!empty($output['user']['avatar'])){ echo $output['user']['avatar'];}else{ echo 'member.png';}?>"/>
        </div>
        <div class="dangan">
            <div class="box"><span>关注</span><b><?php echo $output['mcount'];?></b><img src="<?php echo TEMPLATE_SITE_URL;?>/zsm-static/pic/xin.svg"/></div>
            <div class="box left-border"><span>粉丝</span><b><?php echo $output['fcount'];?></b><img src="<?php echo TEMPLATE_SITE_URL;?>/zsm-static/pic/fensi.svg"/></div>
            <div class="box left-border"><span>买入</span><b><?php echo $output['usernum'];?></b><img src="<?php echo TEMPLATE_SITE_URL;?>/zsm-static/pic/mairu.svg"/></div>
            <div class="box left-border"><span>卖出</span><b><?php echo $output['sellernum'];?></b><img src="<?php echo TEMPLATE_SITE_URL;?>/zsm-static/pic/maichu.svg"/></div>
        </div>
    </section>
    <menu class="zhuanchang">
        <ul>
            <li class="caidan"><a class="current" href="index.php?act=my">我发布的</a></li>
            <li class="yaoyao"><img onclick="javascript:location.href='index.php?act=index&op=yao';" src="<?php echo TEMPLATE_SITE_URL;?>/zsm-static/pic/yaoyao.svg" /></li>
            <li class="caidan"><a href="index.php?act=my&type=1" >我喜欢的</a></li>
        </ul>
    </menu>
    <?php if(!empty($output['jingxing_auction_array'])):?>
    <section class="floor">
        <?php foreach($output['jingxing_auction_array'] as $jingxing_auction_array):?>
        <div class="list-fb">
            <div class="img-box">
                <div class="xiajia handle" auction_id="<?php echo $jingxing_auction_array['id'];?>">
                    <img src="<?php echo TEMPLATE_SITE_URL;?>/zsm-static/pic/xiajia.svg" />
                </div>
                <a href="index.php?act=index&auction_id=<?php echo $jingxing_auction_array['id'];?>">
                <img src="<?php echo UPLOAD_SITE_URL.'/shop/auction/'.$jingxing_auction_array['auction_add_date'].'/'.$jingxing_auction_array['auction_img1'];?>"/>
                </a>
            </div>
            <h4><?php echo $jingxing_auction_array['auction_description'];?></h4>
        </div>
        <?php endforeach;?>
    </section>
    <?php endif;?>
    <!-- 待发布拍品 -->
    <?php if(!empty($output['daifa_auction_array'])):?>
    <section class="floor dfb"><h4>待发布拍品</h4></section>
    <section class="floor">
        <?php foreach($output['daifa_auction_array'] as $daifa_auction_array):?>
        <div class="list-dp">
            <div class="img-box">
                <div class="delete" auction_id="<?php echo $daifa_auction_array['id'];?>">
                    <div><img src="<?php echo TEMPLATE_SITE_URL;?>/zsm-static/pic/delete.svg" /></div>
                </div>
                <?php if($daifa_auction_array['cashprice']>0){?>
                <a href="index.php?act=index&op=auctionselleraddcash&auction_id=<?php echo $daifa_auction_array['id'];?>">
                <?php }else{?>
                <a href="index.php?act=publish&op=step1&auction_id=<?php echo $daifa_auction_array['id'];?>">
                <?php }?>
                <img src="<?php echo UPLOAD_SITE_URL.'/shop/auction/'.$daifa_auction_array['auction_add_date'].'/'.$daifa_auction_array['auction_img1'];?>"/>
                </a>
            </div>
            <h4>
                <?php if($daifa_auction_array['cashprice']>0){?>
                    未支付保证金
                <?php }else{?>
                    草稿
                <?php }?>
            </h4>
        </div>
        <?php endforeach;?>
    </section>
    <?php endif;?>
</div>
<input type="hidden" name="delete_id" val="" />
<script>
    $(function(){

        $(window).scroll(function () {
            var $body = $("body");
            if (($(window).height() + $(window).scrollTop()) >= $body.height()) {
                var haspage = parseInt($('#haspage').val());
                if(haspage=='0'){
                    return false;
                }
                var pagenum = parseInt($('#pagenum').val());
                var nextpage = eval(pagenum+1);

                $.ajax({
                    type:'get',
                    url:'index.php?act=my&op=getjiepaidate',
                    data:{nextpage:nextpage},
                    dataType:'html',
                    success:function(html){
                        $('.loadNextPage').hide();
                        if(html==''){
                            $('#haspage').val('0');
                        }else{
                            $('#pagenum').val(nextpage);
                            $('.jiepai').append(html);
                        }


                        $('.shauction').click(function(){
                            var auction_id = $(this).attr('auction_id');
                            var is_show = $(this).attr('is_show');
                            $('input[name=show_id]').val(auction_id);

                            if(is_show=='1'){
                                $('.showword').html('隐藏');
                                $('.showword').attr('is_show','1');
                            }else{
                                $('.showword').html('显示');
                                $('.showword').attr('is_show','0');
                            }
                            $('#pop4').show();
                            return false;
                        });

                        $('.sh1auction').click(function(){
                            var auction_id = $('input[name=show_id]').val();
                            var is_show = $('.showword').attr('is_show');

                            $.ajax({
                                type:'get',
                                url:'index.php?act=my&op=updateshow',
                                data:{auction_id:auction_id,is_show:is_show},
                                dataType:'json',
                                success:function(data){
                                    if(data.state == 1){
                                        location.reload();
                                    }
                                }
                            });
                            return false;
                        });

                        $('.xiajiapaipin').click(function(){
                            var auction_id = $('input[name=xiajia_id]').val();
                            var state = '1';
                            $.ajax({
                                type:'get',
                                url:'index.php?act=my&op=updatestate',
                                data:{auction_id:auction_id,is_state:state},
                                dataType:'json',
                                success:function(data){
                                    if(data.state == 1){
                                        location.reload();
                                    }
                                }
                            });
                            return false;
                        });
                    },
                    beforeSend:function(){
                        $('.loadNextPage').show();
                    }
                });
            }
        });

        $('.shauction').click(function(){
            var auction_id = $(this).attr('auction_id');
            var is_show = $(this).attr('is_show');
            $('input[name=show_id]').val(auction_id);

            if(is_show=='1'){
                $('.showword').html('隐藏');
                $('.showword').attr('is_show','1');
            }else{
                $('.showword').html('显示');
                $('.showword').attr('is_show','0');
            }
            $('#pop4').show();
            return false;
        });


        $('.handle').click(function(){
            //$('#pop2').show();
            var auction_id = $(this).attr('auction_id');
            layer.open({
                content: '您的拍品确认下架吗？'
                ,btn: ['确认', '取消']
                ,style:'font-size:40px;'
                ,yes: function(index){
                    var state = '1';
                    $.ajax({
                        type:'get',
                        url:'index.php?act=my&op=updatestate',
                        data:{auction_id:auction_id,is_state:state},
                        dataType:'json',
                        success:function(data){
                            if(data.state == 1){
                                location.reload();
                            }
                        }
                    });
                    return false;
                }
            });
            return false;

        });
        $('.delete').click(function(){
            //$('#pop2').show();
            var auction_id = $(this).attr('auction_id');
            layer.open({
                content: '您的拍品确认删除？'
                ,btn: ['确认', '取消']
                ,style:'font-size:40px;'
                ,yes: function(index){
                    $.ajax({
                        type:'get',
                        url:'index.php?act=my&op=delauction',
                        data:{auction_id:auction_id},
                        dataType:'json',
                        success:function(){
                            location.reload();
                        }
                    });
                    return false;
                }
            });
            return false;

        });


        $('.delauction').click(function(){
            var auction_id = $('input[name=delete_id]').val();

            $.ajax({
                type:'get',
                url:'index.php?act=my&op=delauction',
                data:{auction_id:auction_id},
                dataType:'json',
                success:function(){
                    location.reload();
                }
            });
            return false;
        });


        function update(auction_id,state){
            $.ajax({
                type:'get',
                url:'index.php?act=my&op=updatestate',
                data:{auction_id:auction_id,is_state:state},
                dataType:'json',
                success:function(){
                    return false;
                }
            });
        }

        $('.showtip').click(function(){
            $('.myMenuMain').show();
        });

        $('.menuBox').click(function(){
            $('.myMenuMain').hide();
        });

        $('.renew').click(function(){

        });

        $('.hide').click(function(){
            $('#pop3').show();
            var auction_id = $(this).attr('auction_id');
            $('input[name=xiajia_id]').val(auction_id)
            return false;
        });

        $('.sh1auction').click(function(){
            var auction_id = $('input[name=show_id]').val();
            var is_show = $('.showword').attr('is_show');
            $.ajax({
                type:'get',
                url:'index.php?act=my&op=updateshow',
                data:{auction_id:auction_id,is_show:is_show},
                dataType:'json',
                success:function(data){
                    if(data.state == 1){
                        location.reload();
                    }
                }
            });
            return false;
        });
//        $('.xiajiapaipin').click(function(){
//            var auction_id = $('input[name=xiajia_id]').val();
//            var state = '1';
//            $.ajax({
//                type:'get',
//                url:'index.php?act=my&op=updatestate',
//                data:{auction_id:auction_id,is_state:state},
//                dataType:'json',
//                success:function(data){
//                    if(data.state == 1){
//                        location.reload();
//                    }
//                }
//            });
//            return false;
//        });

        $('.greyBn').click(function(){
            $('#pop2').hide();
            $('#pop3').hide();
            $('#pop4').hide();
        });

    });
</script>
<!--引入导航菜单与底部-->
<?php $zh_nav="我的";?>
<?php include template('home/zsm/nav');?>